package com.szholly.pro.watergas_server.ps.schedule;




import java.text.SimpleDateFormat;
import java.util.Date;

import com.szholly.pro.watergas_server.ps.service.StationInfoService;
import org.apache.log4j.Logger;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import lrq.common.MyLog;
/**
 *  定时任务，每天定时把传输稳定性统计结果入库
 * @author hyf
 *
 */
public class OnlineStatusStaticJob  implements Job {

	@Override
	public void execute(JobExecutionContext arg0) throws JobExecutionException {
		Logger log = MyLog.getLogger("OnlineStatusStaticJob");//日志名称
		try {
			StationInfoService service=new StationInfoService();
			SimpleDateFormat fm = new SimpleDateFormat("yyyy-MM-dd"); 
			Date date=new Date();
			String start=fm.format(date);
			String end=fm.format(date);
			service.OnlineStatusStaticTrigger(start,end,null);
			System.out.println("执行了");
		} catch (Exception e) {
			log.error("传输稳定性统计结果入库出错", e);
		}		
	}
	
	
}
